package edu.bbk.muc.lifetracker.common;

import android.location.Location;

/**
 * Wraps lat/lon/alt to simple POJO instead of using Android's Location
 * @author irenatyler and romankirillov
 */
public class SimpleLocation {
  private double lat;
  private double lon;
  private double alt;

  public SimpleLocation() {
  }

  /**
   * Creates {@link SimpleLocation} with given values for longitude, latitude
   * and altitude.
   * 
   * @param lat
   * @param lon
   * @param alt
   */
  public SimpleLocation(double lat, double lon, double alt) {
    this.lat = lat;
    this.lon = lon;
    this.alt = alt;
  }

  public SimpleLocation(Location loc) {
    this.lat = loc.getLatitude();
    this.lon = loc.getLongitude();
    this.alt = loc.getAltitude();
  }

  public double getAlt() {
    return alt;
  }

  public double getLat() {
    return lat;
  }

  public double getLon() {
    return lon;
  }

  @Override
  public String toString() {
    return "SimpleLocation [lat=" + lat + ", lon=" + lon + ", alt=" + alt + "]";
  }
}
